Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
@babel/plugin-transform-shorthand-properties
Advanced tools
Compile ES2015 shorthand properties to ES5
The @babel/plugin-transform-shorthand-properties package is a Babel plugin that transforms object literal shorthand syntax into regular object syntax. This is useful for ensuring compatibility with environments that do not support ES6 shorthand properties.
Transform shorthand properties
Converts shorthand object properties into regular object properties. For example, `{ foo }` becomes `{"foo": foo}`.
{"foo": foo}
Transform shorthand methods
Converts shorthand method definitions into regular function properties. For example, `{ foo() { return 'bar'; } }` becomes `{"foo": function() { return 'bar'; }}`.
{"foo": function() { return 'bar'; }}
This plugin transforms the ES6 spread syntax for arrays and objects, which is somewhat related to shorthand properties in that it's part of the object literal syntax enhancements introduced in ES6. However, it serves a different purpose by allowing an iterable to be expanded in places where zero or more arguments or elements are expected.
This plugin transforms destructuring assignments and rest properties, which are closely related to shorthand properties as they are part of the enhanced object literals in ES6. While @babel/plugin-transform-shorthand-properties focuses on the syntax within object literals, @babel/plugin-transform-destructuring focuses on the syntax used to extract data from arrays or objects.
This plugin adds support for the rest and spread properties for object literals to Babel. It is similar to @babel/plugin-transform-shorthand-properties in that it deals with object literals, but it focuses on the spread and rest properties rather than shorthand syntax.
Compile ES2015 shorthand properties to ES5
See our website @babel/plugin-transform-shorthand-properties for more information.
Using npm:
npm install --save-dev @babel/plugin-transform-shorthand-properties
or using yarn:
yarn add @babel/plugin-transform-shorthand-properties --dev
FAQs
Compile ES2015 shorthand properties to ES5
The npm package @babel/plugin-transform-shorthand-properties receives a total of 23,500,288 weekly downloads. As such, @babel/plugin-transform-shorthand-properties popularity was classified as popular.
We found that @babel/plugin-transform-shorthand-properties demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.